<form id="pagerForm" method="post" action="<?echo __WWWROOT__.'Admin/Manager/index.php'?>">
	<input type="hidden" name="pageNum" value="<?echo $page['pageNum']?>" >
	<input type="hidden" name="numPerPage" value="<?echo $page['numPerPage']?>" >
	<input type="hidden" name="orderField" value="<?echo $page['orderField']?>" >
	<input type="hidden" name="orderDirection" value="<?echo $page['orderDirection']?>" >
	<input type="hidden" name="role_id" value="<?echo isset($_POST['role_id'])?$_POST['role_id']:''?>">
	<input type="hidden" name="username" value="<?echo isset($_POST['username'])?$_POST['username']:''?>" />
	<input type="hidden" name="register_time" value=""<?echo isset($_POST['register_time'])?$_POST['register_time']:''?>" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="<?echo __WWWROOT__.'Admin/Manager/index.php'?>" method="post">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					用户名：<input type="text" name="username" value="" />
				</td>
				<td>
					<select class="combox" name="role_id">
						<option value="">--角色--</option>
							<?foreach($roles as $key=>$r){?>
							<option value="<?echo $key?>"  <?echo ((isset($_POST['role_id'])?(int)$_POST['role_id']:'')==$key)?'selected':''?>><?echo $r?></option>}
							<?}?>
					</select>
				</td>
				<td>
					注册日期：<input type="text" class="date" readonly="true" name="register_time" value=""/>
				</td>
				<td>
					<div class="subBar">
						<ul>
							<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
							<li><div class="buttonActive"><div class="buttonContent"><button type="button" onclick="return navTabSearch(this);">刷新</button></div></div></li>
						</ul>
					</div>
				</td>
			</tr>
		</table>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="<?echo __WWWROOT__.'Admin/Manager/add.php'?>" target="dialog" width="520" height="250"><span>添加</span></a></li>
			<li><a class="edit" href="<?echo __WWWROOT__.'Admin/Manager/update.php?uid='?>{uid}" target="dialog" width="520" height="250"><span>修改</span></a></li>
			<li><a class="delete" href="<?echo __WWWROOT__.'Admin/Manager/delete.php'?>" target="selectedTodo"  rel="ids" postType="string" title="确实要删除这些记录吗?"><span>批量删除</span></a></li>
			<li class="line">line</li>
			<li><a class="icon" href="{{$smarty.const.__URL__}}export/role_id/{{$smarty.post.role_id}}/username/{{$smarty.post.username}}/register_time/{{$smarty.post.register_time}}"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="114">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th orderField="uid" class="<?echo $page['orderDirection']?>">用户ID</th>
				<th>姓名</th>
				<th>密码</th>
				<th>角色</th>
				<th>登录IP</th>
				<th>登录时间</th>
				<th>注册时间</th>
				<th>状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<?foreach($users as $u){?>
			<tr target="uid" rel="<?echo $u['uid']?>">
				<td><input name="ids" value="<?echo $u['uid']?>" type="checkbox"></td>
				<td><?echo $u['uid']?></td>
				<td><?echo $u['username']?></td>
				<td><?echo $u['password']?></td>
				<td><?echo $u['role_id']?></td>
				<td><?echo $u['login_ip']?></td>
				<td><?echo $u['login_time']?></td>
				<td><?echo $u['register_time']?></td>
				<td><?echo $u['state']?></td>
				<td>
					<a target="ajaxTodo" href="<?echo __WWWROOT__.'Admin/Manager/delete.php?ids='.$u['uid']?>" class="btnDel"  title="确定要删除吗?">删除</a>
					<a target="dialog" href="<?echo __WWWROOT__.'Admin/Manager/update.php?uid='.$u['uid']?>" class="btnEdit" width="520" height="250">编辑</a>
				</td>
			</tr>
		    <?}?>
		</tbody>
	</table>
	<?include(ROOT.'Admin/View/Include/page.php')?>
</div>
